package com.hmy.finance.service.core;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hmy.finance.dal.po.DeviceRentalRecordPo;
import com.hmy.finance.job.core.dto.DailyFeeGenerateRequestDto;
import com.hmy.finance.job.core.rdto.dailyfee.WaitHandleContractRdto;

import java.time.LocalDate;
import java.util.List;

/**
 * @author songkf
 * @description 针对表【device_rental_record(设备租赁记录表)】的数据库操作Service
 * @createDate 2024-02-21 18:55:01
 */
public interface IDeviceRentalRecordService extends IService<DeviceRentalRecordPo> {

    List<String> queryAllRentingDeviceContract(LocalDate startDate, LocalDate endDate, Long contractId);

    /**
     * 根据合同ID，查询所有在租设备及今日退租的设备租赁记录
     *
     * @param contractId 合同ID
     * @return List<DeviceRentalRecordPo>
     * @author songkf
     */
    List<DeviceRentalRecordPo> queryRentingDeviceRentalRecordByContractId(Long contractId, LocalDate handleDate);

    /**
     * 批量更新设备租赁记录的费用信息
     *
     * @param deviceRentalRecordPoList 设备租赁记录列表
     * @return int 更新成功的数量
     * @author songkf
     */
    int updateDeviceRentalRecordFeeAmount(List<DeviceRentalRecordPo> deviceRentalRecordPoList);

    List<WaitHandleContractRdto> getWaitHandleContractInfoList(DailyFeeGenerateRequestDto dailyFeeGenerateRequestDto);

}
